<?php
/**
 * Created by PhpStorm.
 * User: jz
 * Date: 16/7/13
 * Time: 下午1:45
 */
require_once ('bookmark_fns.php');

$user = $_POST['username'];
do_html_header('重置密码');

try {
    $passwd = reset_passwd($user);
    notify_passwd($user, $passwd);
    echo '密码已发送到您的邮箱,请查收<br>';
}catch(Exception $e){
    echo '重置密码失败<br>'; 
    echo $e->getMessage();
}
do_html_url('login.php', '登陆');
do_html_footer();
?>